<template>
  <el-tag size="small" :type="dataType == 3 ? 'danger' : 'info'" effect="dark">{{ compName }}</el-tag>
</template>

<script>
import { mapState } from 'vuex';
import { typeList } from '../data.js';
export default {
  props: {
    value: {
      type: String,
      default: ''
    },
    tdStyle: {},
    x: {
      type: Number,
      default: 0
    },
    y: {
      type: Number,
      default: 0
    },
    disabled: {
      type: Boolean,
      default: false
    },
    dicData: {
      type: Array,
      default: () => []
    },
    type: { type: String },
    dataType: {}
  },
  computed: {
    ...mapState({
      cellInfo: (state) => state.form.cellInfo,
      dataJson: (state) => state.form.dataJson,
      apiJson: (state) => state.form.apiJson,
      submitJson: (state) => state.form.submitJson,
      dictJson: (state) => state.form.dictJson,
      histroyData: (state) => state.form.histroyData,
      histroyIndex: (state) => state.form.histroyIndex,
      baseTableConfig: (state) => state.form.baseTableConfig,
      boxAreaXY: (state) => state.form.boxAreaXY,
      xAxisNum: (state) => state.form.xAxisNum,
      yAxisNum: (state) => state.form.yAxisNum
    }),
    compName() {
      let find = this.typeList.find((item) => item.value == this.type);
      return find ? find.label : '';
    }
  },
  data() {
    return {
      typeList
    };
  },
  methods: {}
};
</script>

<style lang="scss" scoped></style>
